﻿@model MVC.Models.Evento

@{
    ViewBag.Title = "DetalhesEvento";
    string data= Model.DiaEscolar.Dia.ToShortDateString();
    bool autorizacao = ViewBag.Autorizacao;  
}

<fieldset>
    <legend>DetalhesEvento</legend>
  
   <div class="display-field">NomeEvento : @Html.DisplayFor(model => model.NomeEvento)</div>      
    <div class="display-field">HoraInicio : @Html.DisplayFor(model => model.HoraInicio)</div>    
    <div class="display-field">HoraFim : @Html.DisplayFor(model => model.HoraFim)</div>    
    <div class="display-field">Descricao : @Html.DisplayFor(model => model.Descricao)</div>
    <div class="display-field">Sala : @Html.DisplayFor(model => model.Sala.NomeSala)</div>    
    <div class="display-field">Data : @Html.Label("data",data)</div>    
</fieldset>
<br />
@if (autorizacao)
{
 @Html.ActionLink("Remover educando do evento", "RemoverParticipacao", new { id=Model.EventoId, criancaId = ViewBag.Crianca })   
}
else
{
 @Html.ActionLink("Autorizar participacao do educando no evento", "AutorizarParticipacao", new { id=Model.EventoId, criancaId = ViewBag.Crianca })
}
<br />
<p>  
    @Html.ActionLink("Back", "Index", "DiaEscolar", new { diaActual = Model.DiaEscolar.Dia, criancaId = ViewBag.Crianca }, null)
</p>
